<!--
 * @Author: your name
 * @Date: 2020-08-12 15:27:13
 * @LastEditTime: 2020-08-12 19:43:27
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \devopsh:\project\QMangolia-web\src\views\code\verify\general.vue
-->
<template>
  <div class="verify-general">
    <div class="related-user">
      <div>
        <label for="">测试计划负责人</label>
        <span class="related-user-item" v-for="(item, index) in testLeader" :key="index">
          <img :src="item.avatar" :alt="item.name">
          <span>{{ item.name }}</span>
        </span>
      </div>
      <div>
        <label for="">参与测试人员</label>
        <span class="related-user-item" v-for="(item, index) in testers" :key="index">
          <img :src="item.avatar" :alt="item.name">
          <span>{{ item.name }}</span>
        </span>
      </div>
      <div>
        <label for="">参与研发人员</label>
        <span class="related-user-item" v-for="(item, index) in developers" :key="index">
          <img :src="item.avatar" :alt="item.name">
          <span>{{ item.name }}</span>
        </span>
      </div>
    </div>
    <h4>概况</h4>
    <el-row :gutter="20">
      <el-col :span="6">
        <div>
          <label for="">关联需求</label>
          <span>123</span>
        </div>
      </el-col>
      <el-col :span="6">
        <div>
          <label for="">关联任务</label>
          <span>123</span>
        </div>
      </el-col>
      <el-col :span="6">
        <div>
          <label for="">用例覆盖率</label>
          <span>123</span>
        </div>
      </el-col>
      <el-col :span="6">
        <div>
          <label for="">总体评估</label>
          <span>123</span>
        </div>
      </el-col>
    </el-row>
    <el-row :gutter="20">
      <el-col :span="6">
        <div>
          <label for="">测试次数</label>
          <span>123</span>
        </div>
      </el-col>
      <el-col :span="6">
        <div>
          <label for="">失败/阻塞次数</label>
          <span>123</span>
        </div>
      </el-col>
      <el-col :span="6">
        <div>
          <label for="">通过次数</label>
          <span>123</span>
        </div>
      </el-col>
      <el-col :span="6">
        <div>
          <label for="">最后一次</label>
          <span>123</span>
        </div>
      </el-col>
    </el-row>
    <el-row :gutter="20">
      <el-col :span="6">
        <div>
          <label for="">产生缺陷</label>
          <span>123</span>
        </div>
      </el-col>
      <el-col :span="6">
        <div>
          <label for="">遗留缺陷</label>
          <span>123</span>
        </div>
      </el-col>
      <el-col :span="6">
        <div>
          <label for="">驳回缺陷</label>
          <span>123</span>
        </div>
      </el-col>
      <el-col :span="6">
        <div>
          <label for="">通过率</label>
          <span>123</span>
        </div>
      </el-col>
    </el-row>
    <h4>总体评价</h4>
    <div class="verify-general-comment">{{ comment }}</div>
    <h4>附件</h4>
    <ul class="attach-list">
      <li v-for="(item, index) in attachList">
        <span>{{ item.name }}</span>
        <i class="el-icon-download"></i>
      </li>
    </ul>
  </div>
</template>

<script>
export default {
  data() {
    return {
      comment: '评价内容',
      attachList: [{
        name: '附件1',
        url: 'https://www.google.com/'
      }, {
        name: '附件2',
        url: 'https://www.google.com/'
      }, {
        name: '附件3',
        url: 'https://www.google.com/'
      }],
      testLeader: [{
        id: 'liuyi',
        name: '刘一',
        avatar: 'https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=1019725746,2053024139&fm=26&gp=0.jpg'
      }],
      testers: [{
        id: 'chener',
        name: '陈二',
        avatar: 'https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=1019725746,2053024139&fm=26&gp=0.jpg'
      }, {
        id: 'zhangsan',
        name: '张三',
        avatar: 'https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=1019725746,2053024139&fm=26&gp=0.jpg'
      }],
      developers: [{
        id: 'lisi',
        name: '李四',
        avatar: 'https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=1019725746,2053024139&fm=26&gp=0.jpg'
      }, {
        id: 'wangwu',
        name: '王五',
        avatar: 'https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=1019725746,2053024139&fm=26&gp=0.jpg'
      }]
    }
  }
}
</script>

<style lang="scss" scoped>
.verify-general {
  font-size: 14px;
  color: #333;
  label {
    font-weight: normal;
  }
  h4 {
    margin: 24px 0;
  }
  .el-row {
    margin-bottom: 24px;
    label {
      width: 40%;
      display: inline-block;
    }
  }
  div.related-user {
    div {
      display: flex;
      align-items: center;
      margin-bottom: 12px;
      label {
        width: 120px;
      }
      span.related-user-item {
        display: flex;
        align-items: center;
        margin-right: 16px;
        img {
          width: 32px;
          height: 32px;
          border-radius: 50%;
          margin-right: 8px;
        }
      }
      
    }
  }
  ul.attach-list {
    li {
      padding: 8px 0;
      i {
        cursor: pointer;
      }
    }
  }
}
</style>